package com.chinairi.mall.dao;

import com.chinairi.mall.model.ProjectPlanReqStorage;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.chinairi.mall.model.StorageAddress;
import com.chinairi.mall.service.modelobject.ProjectPlanReqStorageMO;
import com.chinairi.mall.service.modelobject.StorageFlatMO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author Webgasd
 * @since 2020-10-15
 */
public interface ProjectPlanReqStorageMapper extends BaseMapper<ProjectPlanReqStorage> {
    /**
     * 根据所选物料组筛选库点组
     *
     * @param planMatCodeList
     * @param planReqId
     * @return
     */
    List<StorageAddress> selectStorageList(@Param("planMatCodeList") List<String> planMatCodeList, @Param("planReqId") String planReqId);

    /**
     * 批量更新
     * @param storageFlatMoList
     */
    void batchUpdateByPick (@Param("storageFlatMoList") List<StorageFlatMO> storageFlatMoList);

    /**
     * 批量插入
     * @param projectPlanReqStorageList
     */
    void batchInsert(@Param("projectPlanReqStorageList") List<ProjectPlanReqStorage> projectPlanReqStorageList);

    /**
     * 获取平库信息列表
     * @param planReqId
     * @param planMatCode
     * @return
     */
    List<ProjectPlanReqStorageMO> getStorageFlatList(@Param("planReqId") String planReqId, @Param("planMatCode") String planMatCode);
}
